package com.main;

import java.util.Date;

import org.testng.Assert;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;

public class EventObjectTest {
	private EventObject eventObject1, eventObject2;
	private String id= "eventId";
	private String name = "eventName";
	private Date date = new Date();
		
  @BeforeTest
  public void beforeTest() {
	  eventObject2 = new EventObject();
  }

  
  @Test
  public void getEventObject() {
    eventObject1 = new EventObject(id, name, date);
    Assert.assertEquals(eventObject1.getId(), id);
    Assert.assertEquals(eventObject1.getName(), name);
    Assert.assertEquals(eventObject1.getDate(), date);    
  }

  
  @Test
  public void getDate() {
	  eventObject2.setDate(date);
	  Assert.assertEquals(eventObject2.getDate(), date);	    
  }

  @Test
  public void getId() {
	  eventObject2.setId(id);
	  Assert.assertEquals(eventObject2.getId(), id);
  }

  @Test
  public void getName() {
	  eventObject2.setName(name);
	  Assert.assertEquals(eventObject2.getName(), name);
  }

  @Test
  public void setDate() {
    eventObject1 = new EventObject();
    eventObject1.setDate(date);
    Assert.assertEquals(eventObject1.getDate(), date);
  }

  @Test
  public void setId() {
	    eventObject1 = new EventObject();
	    eventObject1.setId(id);
	    Assert.assertEquals(eventObject1.getId(), id);
  }

  @Test
  public void setName() {
	    eventObject1 = new EventObject();
	    eventObject1.setName(name);
	    Assert.assertEquals(eventObject1.getName(), name);
  }
  
}
